home *** CD-ROM | disk | FTP | other *** search
/ The Arsenal Files 6 / The Arsenal Files 6 (Arsenal Computer).ISO / prg_basi / agavb25.zip / VB.ZIP / GFRAMES.FRM < prev    next >
Text File  |  1996-01-16  |  16KB  |  503 lines

  1. VERSION 2.00
  2. Begin Form FrameDemo 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Frame & Background Demo"
  6.    ClientHeight    =   4320
  7.    ClientLeft      =   1500
  8.    ClientTop       =   1455
  9.    ClientWidth     =   5970
  10.    Height          =   4725
  11.    Left            =   1440
  12.    LinkTopic       =   "Form2"
  13.    MaxButton       =   0   'False
  14.    MDIChild        =   -1  'True
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   4320
  17.    ScaleWidth      =   5970
  18.    Top             =   1110
  19.    Width           =   6090
  20.    Begin Frame Frame1 
  21.       BackColor       =   &H00C0C0C0&
  22.       Caption         =   "Picture Properties"
  23.       Height          =   1680
  24.       Left            =   3360
  25.       TabIndex        =   16
  26.       Top             =   1400
  27.       Width           =   2535
  28.       Begin OptionButton Option1 
  29.          BackColor       =   &H00C0C0C0&
  30.          Caption         =   "FramePicture"
  31.          FontBold        =   0   'False
  32.          FontItalic      =   0   'False
  33.          FontName        =   "MS Sans Serif"
  34.          FontSize        =   8.25
  35.          FontStrikethru  =   0   'False
  36.          FontUnderline   =   0   'False
  37.          Height          =   225
  38.          Index           =   0
  39.          Left            =   90
  40.          TabIndex        =   5
  41.          Top             =   300
  42.          Value           =   -1  'True
  43.          Width           =   2100
  44.       End
  45.       Begin OptionButton Option1 
  46.          BackColor       =   &H00C0C0C0&
  47.          Caption         =   "BackgroundPicture"
  48.          FontBold        =   0   'False
  49.          FontItalic      =   0   'False
  50.          FontName        =   "MS Sans Serif"
  51.          FontSize        =   8.25
  52.          FontStrikethru  =   0   'False
  53.          FontUnderline   =   0   'False
  54.          Height          =   225
  55.          Index           =   1
  56.          Left            =   90
  57.          TabIndex        =   6
  58.          Top             =   540
  59.          Width           =   2100
  60.       End
  61.       Begin PictureBox Image1 
  62.          Height          =   645
  63.          Index           =   4
  64.          Left            =   1605
  65.          Picture         =   GFRAMES.FRX:0000
  66.          ScaleHeight     =   41
  67.          ScaleMode       =   3  'Pixel
  68.          ScaleWidth      =   41
  69.          TabIndex        =   7
  70.          Top             =   900
  71.          Width           =   645
  72.       End
  73.       Begin PictureBox Image1 
  74.          Height          =   645
  75.          Index           =   2
  76.          Left            =   945
  77.          Picture         =   GFRAMES.FRX:463A
  78.          ScaleHeight     =   41
  79.          ScaleMode       =   3  'Pixel
  80.          ScaleWidth      =   41
  81.          TabIndex        =   8
  82.          Top             =   900
  83.          Width           =   645
  84.       End
  85.       Begin PictureBox Image1 
  86.          Height          =   645
  87.          Index           =   0
  88.          Left            =   300
  89.          Picture         =   GFRAMES.FRX:8C14
  90.          ScaleHeight     =   41
  91.          ScaleMode       =   3  'Pixel
  92.          ScaleWidth      =   41
  93.          TabIndex        =   9
  94.          Top             =   900
  95.          Width           =   645
  96.       End
  97.    End
  98.    Begin Timer Timer1 
  99.       Interval        =   1000
  100.       Left            =   5250
  101.       Top             =   4770
  102.    End
  103.    Begin Frame Frame3 
  104.       BackColor       =   &H00C0C0C0&
  105.       Caption         =   "Frame Scaling Properties"
  106.       Height          =   1020
  107.       Left            =   30
  108.       TabIndex        =   27
  109.       Top             =   3150
  110.       Width           =   4095
  111.       Begin HScrollBar HScroll1 
  112.          Height          =   240
  113.          Index           =   0
  114.          Left            =   1260
  115.          Max             =   140
  116.          TabIndex        =   29
  117.          Top             =   330
  118.          Width           =   2400
  119.       End
  120.       Begin HScrollBar HScroll1 
  121.          Height          =   240
  122.          Index           =   1
  123.          Left            =   1260
  124.          Max             =   140
  125.          TabIndex        =   28
  126.          Top             =   570
  127.          Width           =   2400
  128.       End
  129.       Begin Label Label2 
  130.          Alignment       =   2  'Center
  131.          AutoSize        =   -1  'True
  132.          BackStyle       =   0  'Transparent
  133.          Caption         =   "0"
  134.          Height          =   195
  135.          Index           =   0
  136.          Left            =   3780
  137.          TabIndex        =   0
  138.          Top             =   360
  139.          Width           =   120
  140.       End
  141.       Begin Label Label1 
  142.          AutoSize        =   -1  'True
  143.          BackStyle       =   0  'Transparent
  144.          Caption         =   "Frame Scale X:"
  145.          FontBold        =   0   'False
  146.          FontItalic      =   0   'False
  147.          FontName        =   "MS Sans Serif"
  148.          FontSize        =   8.25
  149.          FontStrikethru  =   0   'False
  150.          FontUnderline   =   0   'False
  151.          Height          =   195
  152.          Index           =   0
  153.          Left            =   165
  154.          TabIndex        =   2
  155.          Top             =   330
  156.          Width           =   1080
  157.       End
  158.       Begin Label Label1 
  159.          AutoSize        =   -1  'True
  160.          BackStyle       =   0  'Transparent
  161.          Caption         =   "Frame Scale Y:"
  162.          FontBold        =   0   'False
  163.          FontItalic      =   0   'False
  164.          FontName        =   "MS Sans Serif"
  165.          FontSize        =   8.25
  166.          FontStrikethru  =   0   'False
  167.          FontUnderline   =   0   'False
  168.          Height          =   195
  169.          Index           =   1
  170.          Left            =   150
  171.          TabIndex        =   3
  172.          Top             =   585
  173.          Width           =   1080
  174.       End
  175.       Begin Label Label2 
  176.          Alignment       =   2  'Center
  177.          AutoSize        =   -1  'True
  178.          BackStyle       =   0  'Transparent
  179.          Caption         =   "0"
  180.          Height          =   195
  181.          Index           =   1
  182.          Left            =   3780
  183.          TabIndex        =   30
  184.          Top             =   600
  185.          Width           =   120
  186.       End
  187.    End
  188.    Begin AGAUGE Gauge1 
  189.       Angle           =   0
  190.       AutoRedraw      =   -1  'True
  191.       AVersion        =   2.5
  192.       BackgroundColor =   &H00FFFFFF&
  193.       BevelInner      =   0  ' 0 - None
  194.       BevelOuter      =   0  ' 0 - None
  195.       BevelWidth      =   2
  196.       BorderType      =   1  ' 1 - Bevel
  197.       BorderWidth     =   0
  198.       FontID          =   0
  199.       FrameColor      =   &H0000C0C0&
  200.       FrameScaleX     =   1.1
  201.       FrameScaleY     =   1.1
  202.       FrameStyle      =   1  ' 1 - Circle
  203.       Height          =   3015
  204.       Left            =   30
  205.       MouseControl    =   -1  'True
  206.       OutlineAlign    =   0  ' 0 - Left 
  207.       OutlineColor    =   &H00000000&
  208.       OutlineTitle    =   ""
  209.       OutlineWidth    =   0
  210.       Radius          =   0
  211.       Shape           =   ""
  212.       TabIndex        =   1
  213.       Top             =   60
  214.       Value           =   0
  215.       Width           =   3225
  216.       XScale          =   0
  217.       YScale          =   0
  218.       ZLoad           =   GFRAMES.FRX:1228E
  219.    End
  220.    Begin Frame Frame4 
  221.       BackColor       =   &H00C0C0C0&
  222.       Caption         =   "Color Properties"
  223.       Height          =   1170
  224.       Left            =   3360
  225.       TabIndex        =   21
  226.       Top             =   180
  227.       Width           =   2535
  228.       Begin OptionButton Option3 
  229.          BackColor       =   &H00C0C0C0&
  230.          Caption         =   "BackgroundColor"
  231.          FontBold        =   0   'False
  232.          FontItalic      =   0   'False
  233.          FontName        =   "MS Sans Serif"
  234.          FontSize        =   8.25
  235.          FontStrikethru  =   0   'False
  236.          FontUnderline   =   0   'False
  237.          Height          =   195
  238.          Index           =   1
  239.          Left            =   90
  240.          TabIndex        =   10
  241.          Top             =   570
  242.          Width           =   1600
  243.       End
  244.       Begin OptionButton Option3 
  245.          BackColor       =   &H00C0C0C0&
  246.          Caption         =   "FrameColor"
  247.          FontBold        =   0   'False
  248.          FontItalic      =   0   'False
  249.          FontName        =   "MS Sans Serif"
  250.          FontSize        =   8.25
  251.          FontStrikethru  =   0   'False
  252.          FontUnderline   =   0   'False
  253.          Height          =   195
  254.          Index           =   0
  255.          Left            =   90
  256.          TabIndex        =   11
  257.          Top             =   330
  258.          Value           =   -1  'True
  259.          Width           =   1600
  260.       End
  261.       Begin Label HColors 
  262.          BackColor       =   &H00808000&
  263.          Height          =   225
  264.          Index           =   9
  265.          Left            =   2190
  266.          TabIndex        =   26
  267.          Top             =   825
  268.          Width           =   225
  269.       End
  270.       Begin Label HColors 
  271.          BackColor       =   &H000080FF&
  272.          Height          =   225
  273.          Index           =   4
  274.          Left            =   1035
  275.          TabIndex        =   12
  276.          Top             =   825
  277.          Width           =   225
  278.       End
  279.       Begin Label HColors 
  280.          BackColor       =   &H00000000&
  281.          Height          =   225
  282.          Index           =   0
  283.          Left            =   120
  284.          TabIndex        =   17
  285.          Top             =   825
  286.          Width           =   225
  287.       End
  288.       Begin Label HColors 
  289.          BackColor       =   &H00808080&
  290.          Height          =   225
  291.          Index           =   5
  292.          Left            =   1275
  293.          TabIndex        =   18
  294.          Top             =   825
  295.          Width           =   225
  296.       End
  297.       Begin Label HColors 
  298.          BackColor       =   &H00FFFFFF&
  299.          Height          =   225
  300.          Index           =   1
  301.          Left            =   345
  302.          TabIndex        =   19
  303.          Top             =   825
  304.          Width           =   225
  305.       End
  306.       Begin Label HColors 
  307.          BackColor       =   &H000000FF&
  308.          Height          =   225
  309.          Index           =   6
  310.          Left            =   1500
  311.          TabIndex        =   20
  312.          Top             =   825
  313.          Width           =   225
  314.       End
  315.       Begin Label HColors 
  316.          BackColor       =   &H0000FF00&
  317.          Height          =   225
  318.          Index           =   2
  319.          Left            =   585
  320.          TabIndex        =   25
  321.          Top             =   825
  322.          Width           =   225
  323.       End
  324.       Begin Label HColors 
  325.          BackColor       =   &H0000FFFF&
  326.          Height          =   225
  327.          Index           =   7
  328.          Left            =   1740
  329.          TabIndex        =   24
  330.          Top             =   825
  331.          Width           =   225
  332.       End
  333.       Begin Label HColors 
  334.          BackColor       =   &H00FF0000&
  335.          Height          =   225
  336.          Index           =   3
  337.          Left            =   810
  338.          TabIndex        =   23
  339.          Top             =   825
  340.          Width           =   225
  341.       End
  342.       Begin Label HColors 
  343.          BackColor       =   &H00FF00FF&
  344.          Height          =   225
  345.          Index           =   8
  346.          Left            =   1965
  347.          TabIndex        =   22
  348.          Top             =   825
  349.          Width           =   225
  350.       End
  351.    End
  352.    Begin Frame Frame2 
  353.       BackColor       =   &H00C0C0C0&
  354.       Caption         =   "FrameStyle"
  355.       Height          =   1020
  356.       Left            =   4425
  357.       TabIndex        =   13
  358.       Top             =   3150
  359.       Width           =   1275
  360.       Begin OptionButton Option2 
  361.          BackColor       =   &H00C0C0C0&
  362.          Caption         =   "Rectangle"
  363.          FontBold        =   0   'False
  364.          FontItalic      =   0   'False
  365.          FontName        =   "MS Sans Serif"
  366.          FontSize        =   8.25
  367.          FontStrikethru  =   0   'False
  368.          FontUnderline   =   0   'False
  369.          Height          =   225
  370.          Index           =   2
  371.          Left            =   90
  372.          TabIndex        =   4
  373.          Top             =   705
  374.          Width           =   1100
  375.       End
  376.       Begin OptionButton Option2 
  377.          BackColor       =   &H00C0C0C0&
  378.          Caption         =   "Circle"
  379.          FontBold        =   0   'False
  380.          FontItalic      =   0   'False
  381.          FontName        =   "MS Sans Serif"
  382.          FontSize        =   8.25
  383.          FontStrikethru  =   0   'False
  384.          FontUnderline   =   0   'False
  385.          Height          =   225
  386.          Index           =   1
  387.          Left            =   90
  388.          TabIndex        =   15
  389.          Top             =   495
  390.          Width           =   1095
  391.       End
  392.       Begin OptionButton Option2 
  393.          BackColor       =   &H00C0C0C0&
  394.          Caption         =   "None"
  395.          FontBold        =   0   'False
  396.          FontItalic      =   0   'False
  397.          FontName        =   "MS Sans Serif"
  398.          FontSize        =   8.25
  399.          FontStrikethru  =   0   'False
  400.          FontUnderline   =   0   'False
  401.          Height          =   225
  402.          Index           =   0
  403.          Left            =   90
  404.          TabIndex        =   14
  405.          Top             =   270
  406.          Width           =   1125
  407.       End
  408.    End
  409. End
  410.  
  411. Sub Form_Load ()
  412.  
  413.     hscroll1(0) = gauge1.FrameScaleX * 100
  414.     hscroll1(1) = gauge1.FrameScaleY * 100
  415.     option2(gauge1.FrameStyle) = True
  416.  
  417.     Timer1_Timer
  418.  
  419. End Sub
  420.  
  421. Sub HColors_Click (index As Integer)
  422.  
  423.     If option3(0) Then
  424.         gauge1.FrameColor = hcolors(index).BackColor
  425.         gauge1.FramePicture = LoadPicture("")
  426.     Else
  427.         gauge1.BackgroundColor = hcolors(index).BackColor
  428.         gauge1.BackgroundPicture = LoadPicture("")
  429.     End If
  430.  
  431. End Sub
  432.  
  433. Sub HScroll1_Change (index As Integer)
  434.  
  435.     Select Case index
  436.         Case 0
  437.             gauge1.FrameScaleX = hscroll1(0) / 100
  438.             label2(0) = hscroll1(0) / 100
  439.         Case 1
  440.             gauge1.FrameScaleY = hscroll1(1) / 100
  441.             label2(1) = hscroll1(1) / 100
  442.     End Select
  443.  
  444. End Sub
  445.  
  446. Sub HScroll1_Scroll (index As Integer)
  447.  
  448.     Select Case index
  449.         Case 0
  450.             gauge1.FrameScaleX = hscroll1(0) / 100
  451.             label2(0) = hscroll1(0) / 100
  452.         Case 1
  453.             gauge1.FrameScaleY = hscroll1(1) / 100
  454.             label2(1) = hscroll1(1) / 100
  455.     End Select
  456.  
  457. End Sub
  458.  
  459. Sub Image1_Click (index As Integer)
  460.  
  461.     If option1(0) Then
  462.         gauge1.FramePicture = Image1(index).Picture
  463.     Else
  464.         gauge1.BackgroundPicture = Image1(index).Picture
  465.     End If
  466.  
  467. End Sub
  468.  
  469. Sub Option2_Click (index As Integer)
  470.  
  471.     gauge1.FrameStyle = index
  472.     If index = 1 Then
  473.         label1(1).Visible = False
  474.         hscroll1(1).Visible = False
  475.         label2(1).Visible = False
  476.     Else
  477.         label1(1).Visible = True
  478.         hscroll1(1).Visible = True
  479.         label2(1).Visible = True
  480.     End If
  481.  
  482.  
  483. End Sub
  484.  
  485. Sub Timer1_Timer ()
  486.  
  487.     numhours = Val(Format$(Now, "hh"))
  488.     If numhours > 12 Then numhours = numhours - 12#
  489.     nummins = Val(Format$(Now, "nn"))
  490.     numsecs = Val(Format$(Now, "ss"))
  491.  
  492.     gauge1.NeedleID = 0
  493.     gauge1.NeedleValue = numhours + nummins / 60#
  494.     gauge1.NeedleID = 1
  495.     gauge1.NeedleScaleID = 1
  496.     gauge1.NeedleValue = nummins
  497.     gauge1.NeedleID = 2
  498.     gauge1.NeedleScaleID = 1
  499.     gauge1.NeedleValue = numsecs
  500.  
  501. End Sub
  502.  
  503.